text = 'PyShell %s\n\n' % VERSION + 'Yet another Python shell, only flakier.\n\n' + "Half-baked by Patrick K. O'Brien,\n" + 'the other half is still in the oven.\n\n' + 'Shell Revision: %s\n' % self.shell.revision + 'Interpreter Revision: %s\n\n' % self.shell.interp.revision + 'Platform: %s\n' % sys.platform + 'Python Version: %s\n' % sys.version.split()[0] + 'wxPython Version: %s\n' % wx.VERSION_STRING + '\t(%s)\n' % ', '.join(wx.PlatformInfo[1:])
HELP_TEXT = '* Key bindings:\nHome Go to the beginning of the command or line.\nShift+Home Select to the beginning of the command or line.\nShift+End Select to the end of the line.\nEnd Go to the end of the line.\nCtrl+C Copy selected text, removing prompts.\nCtrl+Shift+C Copy selected text, retaining prompts.\nAlt+C Copy to the clipboard, including prefixed prompts.\nCtrl+X Cut selected text.\nCtrl+V Paste from clipboard.\nCtrl+Shift+V Paste and run multiple commands from clipboard.\nCtrl+Up Arrow Retrieve Previous History item.\nAlt+P Retrieve Previous History item.\nCtrl+Down Arrow Retrieve Next History item.\nAlt+N Retrieve Next History item.\nShift+Up Arrow Insert Previous History item.\nShift+Down Arrow Insert Next History item.\nF8 Command-completion of History item.\n (Type a few characters of a previous command and press F8.)\nCtrl+Enter Insert new line into multiline command.\nCtrl+] Increase font size.\nCtrl+[ Decrease font size.\nCtrl+= Default font size.\nCtrl-Space Show Auto Completion.\nCtrl-Alt-Space Show Call Tip.\nShift+Enter Complete Text from History.\nCtrl+F Search\nF3 Search next\nCtrl+H "hide" lines containing selection / "unhide"\nF12 on/off "free-edit" mode\n'
if self.GetSelectionStart() != self.GetSelectionEnd() and self.GetSelectionStart() >= self.promptPosEnd and self.GetSelectionEnd() >= self.promptPosEnd:
return True
else:
return False
def CanPaste(self):
if self.CanEdit() and editwindow.EditWindow.CanPaste(self):
return True
else:
return False
def CanEdit(self):
if self.GetSelectionStart() != self.GetSelectionEnd():
if self.GetSelectionStart() >= self.promptPosEnd and self.GetSelectionEnd() >= self.promptPosEnd: